## java env
export JAVA_HOME=/opt/jdk1.8.0_91
export JRE_HOME=$JAVA_HOME/jre

## service name
APP_NAME=admin
SERVICE_DIR=/opt/eh-plat/web-ehm
SERVICE_NAME=ehm-web-$APP_NAME
cd $SERVICE_DIR/webapps
rm -rf ROOT
mv ehm-web-admin ROOT

## restart tomcat
$SERVICE_DIR/bin/shutdown.sh
sleep 3
ps -ef | grep java | grep $SERVICE_NAME/ | grep -v grep | awk '{print $2}'  | sed -e "s/^/kill -9 /g" | sh
$SERVICE_DIR/bin/startup.sh
